package com.aisile.common.exception;

import com.aisile.model.common.enums.AdminHttpCodeEnum;
import com.aisile.model.common.enums.AppHttpCodeEnum;
import com.aisile.model.common.enums.WemediaHttpCodeEnum;

/**
 * @Auther:yry
 * @Date:2024/7/11 0011
 * @VERSON:1.0
 */
public class CustomExceptionThrows {
    /**
     * admin 专用
     * @param adminHttpCodeEnum
     */
    public static void catchAdmin(AdminHttpCodeEnum adminHttpCodeEnum){
        throw new CustomException(adminHttpCodeEnum.getCode(),adminHttpCodeEnum.getErrorMessage());
    }
    public static void catchWemeida(WemediaHttpCodeEnum wemediaHttpCodeEnum){
        throw new CustomException(wemediaHttpCodeEnum.getCode(),wemediaHttpCodeEnum.getErrorMessage());
    }
    public static void catchApp(AppHttpCodeEnum appHttpCodeEnum){
        throw new CustomException(appHttpCodeEnum.getCode(),appHttpCodeEnum.getErrorMessage());
    }

}
